<template>
  <view class="notice-container">
    <uni-icons type="sound" size="16" color="#FF8C00"></uni-icons>
    <swiper 
      class="notice-swiper" 
      vertical 
      autoplay 
      circular 
      interval="3000"
    >
      <swiper-item v-for="(item, index) in notices" :key="index">
        <text class="notice-text">{{item}}</text>
      </swiper-item>
    </swiper>
  </view>
</template>

<script setup>
defineProps({
  notices: {
    type: Array,
    default: () => []
  }
})
</script>

<style lang="scss">
@import "@/uni.scss";
.notice-container {
  display: flex;
  align-items: center;
  padding: 20rpx 30rpx;
  background-color: $white-bg;
  border-top: 1rpx solid #eee;
  
  .notice-swiper {
    flex: 1;
    height: 40rpx;
    margin-left: 20rpx;
    
    .notice-text {
      font-size: 26rpx;
      color: $text-color;
      line-height: 40rpx;
    }
  }
}
</style>